﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using GanoESB.Business;

namespace GanoESB.Deamon
{
    public partial class DaemonService : ServiceBase
    {
        private Server server = null;

        public DaemonService()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            ServerLoader sl = new ServerLoader();
            server = sl.GetServer();
            server.Start(args);
        }

        protected override void OnStop()
        {
            if (server != null)
                server.Stop();
        }
    }
}
